package com.wht.sip.controller;

import com.wht.sip.common.R;
import com.wht.sip.service.DeviceService;
import org.noear.solon.annotation.Controller;
import org.noear.solon.annotation.Inject;
import org.noear.solon.annotation.Mapping;

/**
 * @author by HaiTao.Wang on 2025/9/18.
 */
@Mapping("device")
@Controller
public class DeviceController {

    @Inject
    DeviceService deviceService;

    /**
     * 点播
     *
     * @param deviceId 设备ID
     */
    @Mapping("play")
    public R play(String deviceId) {
        String rtsp = deviceService.play(deviceId);
        return R.data(rtsp);
    }
}
